package cn.haoxsf.app.common.api.enums;

import lombok.Getter;

/**
 * @program: app
 * @description: 系统异常枚举
 * @author: Ele qvbanfm@qq.com
 * @create: 2020-01-06 13:00
 **/
@Getter
public enum SystemExceptionEnum implements IServiceEnum  {
    SUCCESS(200, "请求成功"),
    FAILED(30, "操作失败"),
    VALIDATE_FAILED(404, "参数检验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有商户相关权限"),
    REPEATED_SUBMISSION(100,"操作过快"),
    HTTP_MESSAGE_NOT_READABLE_EXCEPTION(400,"JSON对象参数不正确"),
    SERVER_ERROR(500,""),
    NOT_DATA(501,"暂无数据"),
    THE_PROJECT_IS_NOT_ENABLED(31,"该项目未启用请求期待"),
    LOGOUT_IS_OK(200,"退出成功")
    ;
    private Integer code;
    private String msg;

    SystemExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
